import 'package:spendbook/models/model.dart';

class Category extends Model<Category> {
  @override
  String url = '/category';

  String name = '';

  @override
  void fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    super.fromJson(json);
  }

  @override
  Map<String, dynamic> toJson() => {
        'name': name,
      }..addAll(super.toJson());
}
